<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>inttrap</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : April 1993</div>
    <p>
      <b>inttrap</b> -  integration of experimental data by trapezoidal interpolation</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>v = inttrap([x,] s)  </tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>x</b>
        </tt>: vector of increasing x coordinate data. Default value is <tt>
          <b>1:size(y,'*')</b>
        </tt>
      </li>
      <li>
        <tt>
          <b>s</b>
        </tt>: vector of y coordinate data</li>
      <li>
        <tt>
          <b>v</b>
        </tt>: value of the integral</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
    computes :</p>
    <p>
    Where f is a function described by a set of experimental value:</p>
    <p>
      <tt>
        <b>s(i)=f(x(i))</b>
      </tt>  and <tt>
        <b>x0=x(1)</b>
      </tt>, <tt>
        <b>x1=x(n)</b>
      </tt>
    </p>
    <p>
    Between mesh points function is interpolated linearly.</p>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

t=0:0.1:%pi
inttrap(t,sin(t))
 
  </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="../nonlinear/intg.htm">
        <tt>
          <b>intg</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="../nonlinear/intc.htm">
        <tt>
          <b>intc</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="../nonlinear/intl.htm">
        <tt>
          <b>intl</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="integrate.htm">
        <tt>
          <b>integrate</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="intsplin.htm">
        <tt>
          <b>intsplin</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="splin.htm">
        <tt>
          <b>splin</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
  </body>
</html>
